import Vue from 'vue'
import VueRouter from "vue-router";
import HomeView from "@/views/HomeView";
import BlogView from "@/views/BlogView/BlogView";
import ExamView from "@/views/ExamView/ExamView";
import SchoolView from "@/views/SchoolView/SchoolView";
import FilmView from "@/views/FilmView/FilmView";
import BlogDetail from "@/components/Blog/BlogDetail";

Vue.use(VueRouter)

const routes = [

    {
        path: "/",
        name: "home",
        component: HomeView
    },
    {
        path: "/blog",
        name: "blog",
        component: BlogView,
        children: [

        ]
    },
    {
        path: "/exam",
        name: "exam",
        component: ExamView
    },
    {
        path: "/school",
        name: "school",
        component: SchoolView
    },
    {
        path: "/film",
        name: "film",
        component: FilmView
    },
    {
        path: "/blog/detail/:id",
        name: "blogDetail",
        props: true,
        component: BlogDetail,
    },
]

const router = new VueRouter(
    {
        mode: "history",
        routes
    }
)

export default router


